﻿using System;
using System.Collections.Generic;

namespace Pap.Data
{
    /// <summary>
    /// 
    /// </summary>
    public interface IRole : IEntity
    {
        /// <summary>
        /// Gets or sets the role ID.
        /// </summary>
        /// <value>
        /// The role ID.
        /// </value>
        Guid RoleID
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the name of the role.
        /// </summary>
        /// <value>
        /// The name of the role.
        /// </value>
        string RoleName
        {
            get;
            set;
        }

        /// <summary>
        /// Gets the permissions.
        /// </summary>
        IEnumerable<IPermission> Permissions
        {
            get;
        }

        /// <summary>
        /// Gets the users.
        /// </summary>
        IEnumerable<IUser> Users
        {
            get;
        }

        /// <summary>
        /// Gets the role permissions.
        /// </summary>
        IEnumerable<IRolesPermission> RolePermissions
        {
            get;
        }

        /// <summary>
        /// Adds the permission.
        /// </summary>
        /// <param name="perm">The perm.</param>
        void AddPermission(IPermission perm);

        /// <summary>
        /// Deletes all permissions.
        /// </summary>
        void DeleteAllPermissions();
    }
}
